<?php

namespace app\controller\sys;

use app\BaseController;
use think\Response;

class Supplier extends BaseController
{
    public function save(): Response
    {
        return $this->success($this->app->make(\app\model\Supplier::class)->addOrUpdate());
    }

    public function lst(): Response
    {
        return $this->success($this->app->make(\app\model\Supplier::class)->lst());
    }

    public function detail(): Response
    {
        return $this->success($this->app->make(\app\model\Supplier::class)->find($this->request->param('id')));
    }

    public function searchStation(): Response
    {
      return $this->success($this->app->make(\app\model\SupplierStation::class)->searchStation());
    }

    public function addStation(): Response
    {
        return $this->success($this->app->make(\app\model\SupplierStation::class)->addStation());
    }

    public function station(): Response
    {
        return $this->success($this->app->make(\app\model\SupplierStation::class)->lst());
    }

    public function price(): Response
    {
        return $this->success($this->app->make(\app\model\SupplierStation::class)->price());
    }

    public function deleteStation()
    {
        return $this->success($this->app->make(\app\model\SupplierStation::class)->deleteStation());
    }
}
